package net.csdn.business.common.oauth2.service.impl;


import net.csdn.business.common.oauth2.mapper.StatClientAuthMapper;
import net.csdn.business.common.oauth2.model.entity.StatClientAuth;
import net.csdn.business.common.domain.request.oauth.StatClientAuthQuery;
import net.csdn.business.common.domain.vo.oauth.StatClientAuthVO;
import net.csdn.business.common.oauth2.service.IStatClientAuthService;
import net.csdn.business.common.service.SuperServiceImpl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;


/**
 * 应用授权统计Service业务层处理
 * 
 * @author zhangyal
 * @date 2022-11-16
 */
@Service
public class StatClientAuthServiceImpl extends SuperServiceImpl<StatClientAuthMapper, StatClientAuth> implements IStatClientAuthService
{


    /**
     * 查询应用授权统计列表
     * 
     * @param query 应用授权统计
     * @return 应用授权统计
     */
    @Override
    public List<StatClientAuthVO> selectStatClientAuthList(StatClientAuthQuery query)
    {
        return baseMapper.selectStatClientAuthList(query);
    }

    /**
     * 新增应用授权统计
     *
     * @param statClientAuth 应用授权统计
     * @return 结果
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer insertStatClientAuth(StatClientAuth statClientAuth)
    {
        statClientAuth.setCreatedDate(new Date());
        return baseMapper.insert(statClientAuth);
    }

    /**
     * 修改应用授权统计
     *
     * @param query 应用授权统计
     * @return 结果
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer updateStatClientAuth(StatClientAuthQuery query)
    {

        return baseMapper.updateStatClientAuth(query);
    }

    @Override
    public StatClientAuth selectStatClientAuth(StatClientAuthQuery query) {
        return baseMapper.selectStatClientAuth(query);
    }

}
